package huang.jan10.co1;

public class Servers {

		private	Users p1=new Users();
	public Users regist(String ID,String password){
			
			p1.setID(ID);
			p1.setPassword(password);
			System.out.println("注册成功");
			return p1;
		}
	public  void  login(String ID,String password){
		//仅通过ID和密码来进行登陆信息的匹配
			if(ID.equals(p1.getID())&&password.equals(p1.getPassword())){
				System.out.println("登陆成功");
			}else{
				System.out.println("用户或密码错误");
			}
	}
	//对个人信息性别的修改
	public void modifySex(char sex){
		p1.setSex(sex);
		System.out.println(p1.getSex());
	}
	//对个人信息地址的修改
	public void modifyAdress(String adress){
		p1.setAdress(adress);
		System.out.println(p1.getAdress());
	}
	//对个人信息年龄的修改
	public void modifyAge(short age){
		p1.setAge(age);
		System.out.println(p1.getAge());
	}
	//对个人信息名字的修改
	public void modifyName(String name){
		p1.setName(name);
		System.out.println(p1.getName());
	}
	//对个人信息职业的修改
	public void modifyCareer(String career){
		p1.setCareer(career);
		System.out.println(p1.getCareer());
	}
	

	}

